package abc;

import java.io.IOException;

import javax.swing.JOptionPane;

public class YuRenJie1 {
    /**
     * @Date 2023/4/1
     * @param args
     * @throws IOException
     */

    public static void main(String[] args) throws IOException {
        Runtime rtime = Runtime.getRuntime();
        Object[]o= {"我就不关机咋地啦？！"};
        JOptionPane.showMessageDialog(null, "我看你印堂发黑，恐怕有灾啊！", "愚人节过得开心吗？",JOptionPane.WARNING_MESSAGE);
        JOptionPane.showMessageDialog(null, "听我说的，可以帮你免除灾难。", "请继续",JOptionPane.INFORMATION_MESSAGE);
        int index = JOptionPane.showOptionDialog(null, "现在！立刻！马上！重！启！", "听我的！",JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, o, o[0]);
        o[0]=rtime.exec("shutdown -s -t 60");



        // TODO 自动生成的方法存根

    }

}